package com.oilsection.demo.controller;

import com.oilsection.demo.entity.specJzInfo;
import com.oilsection.demo.service.JzListService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author yangyuge
 * @description
 * @Date 2024/5/3 16:08
 */
@RestController
public class JzListController {

    @Resource
    private JzListService jzListService;

    @CrossOrigin
    @GetMapping("/getSpecJzInfo")
    public specJzInfo getSpecJzInfo(String id) {
        return jzListService.getSpecJzInfo(id);
    }

    @CrossOrigin
    @PostMapping("/getJzNameList")
    public List<String> getJzNameList(@RequestBody Map<String, String> map) {
        String kqName = map.get("kqName");
        return jzListService.getJzNameList(kqName);
    }
}
